package com.enjoyor.soa.traffic.util.enums.signal;

/**
 * 
 * @ClassName: SignalDirct
 * @Description: 信号机方向
 * @author: ly
 * @date: 2019年7月1日 下午6:40:00
 */
public enum LampDir {
	//0	北
	NORTH("0","北"),
	//1	东北
	EASTNORTH("1","东北"),
	//2	东
	EAST("2","东"),
	//3	东南
	EASTSOUTH("3","东南"),
	//4	南
	SOUTH("4","南"),
	//5	西南
	WESTSOUTH("5","西南"),
	//6	西
	WEST("6", "西"),
	//7	西北
	WESTNORTH("7", "西北");
		

		private final String key;

		private final String value;

		private LampDir(String key, String value) {
			this.key = key;
			this.value = value;
		}

		public String getKey() {
			return this.key;
		}

		public String getValue() {
			return this.value;
		}
		
		public static String getValue(String key) {  
			LampDir[] enums = values();  
	        for (LampDir e : enums) {  
	            if (e.getKey().equals(key)) {  
	                return e.getValue();  
	            }  
	        }  
	        return null;  
	    }  
}
